package com.smartleanx.module.hrm.dal.mysql.examine.examineDimensionIndex;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examineDimensionIndex.ExamineDimensionIndexDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examineDimensionIndex.vo.*;

/**
 * 考核维度中间 Mapper
 *
 * @author 
 */
@Mapper
public interface ExamineDimensionIndexMapper extends BaseMapperX<ExamineDimensionIndexDO> {

    default PageResult<ExamineDimensionIndexDO> selectPage(ExamineDimensionIndexPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineDimensionIndexDO>()
                .likeIfPresent(ExamineDimensionIndexDO::getIndexName, reqVO.getIndexName())
                .eqIfPresent(ExamineDimensionIndexDO::getIndexIllustrate, reqVO.getIndexIllustrate())
                .eqIfPresent(ExamineDimensionIndexDO::getIndexStandard, reqVO.getIndexStandard())
                .eqIfPresent(ExamineDimensionIndexDO::getIndexWeight, reqVO.getIndexWeight())
                .eqIfPresent(ExamineDimensionIndexDO::getIndexType, reqVO.getIndexType())
                .eqIfPresent(ExamineDimensionIndexDO::getIndexDimensionId, reqVO.getIndexDimensionId())
                .orderByDesc(ExamineDimensionIndexDO::getId));
    }

}